package com.elric.mall.common.domain;

import com.elric.mall.common.enums.ExcelDataType;
import org.apache.poi.ss.usermodel.FillPatternType;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.xssf.usermodel.XSSFColor;

/**
 * 实现功能：excel导入基类
 *
 * @author 作者[Yuxuan.he]
 * @version 1.0.00  2021-09-24 15:18
 */
public class ImportBase {

    /**
     * 导入行号
     */
    private Integer importRowNum;

    /**
     * 表格标题行数（读取表格内容时会自动跳过）
     */
    private Integer titleIndex = 0;

    /**
     * 验证提示信息
     */
    private String validateMessage;

    /**
     * 是否需要合并单元格
     */
    private boolean region = false;

    /**
     * 合并起始列
     */
    private int startNum;

    /**
     * 合并结束列
     */
    private int endNum;

    /**
     * 背景图片色
     */
    private XSSFColor fillForegroundColor;

    /**
     * 背景图片类型
     */
    private FillPatternType fillPattern;

    /**
     * 字号
     */
    private short fontSize;

    /**
     * 行高
     */
    private short cellHeight = 500;

    /**
     * 水平对其格式
     */
    private HorizontalAlignment alignment;

    /**
     * 是否有边框
     */
    private boolean border = true;

    /**
     * 字体名称
     */
    private String fontName = "宋体";

    /**
     * 数据类型
     */
    private String dataType = ExcelDataType.body.name();

    public Integer getImportRowNum() {
        return importRowNum;
    }

    public void setImportRowNum(Integer importRowNum) {
        this.importRowNum = importRowNum;
    }

    public String getValidateMessage() {
        return validateMessage;
    }

    public void setValidateMessage(String validateMessage) {
        this.validateMessage = validateMessage;
    }

    public Integer getTitleIndex() {
        return titleIndex;
    }

    public void setTitleIndex(Integer titleIndex) {
        this.titleIndex = titleIndex;
    }

    public boolean isRegion() {
        return region;
    }

    public void setRegion(boolean region) {
        this.region = region;
    }

    public int getStartNum() {
        return startNum;
    }

    public void setStartNum(int startNum) {
        this.startNum = startNum;
    }

    public int getEndNum() {
        return endNum;
    }

    public void setEndNum(int endNum) {
        this.endNum = endNum;
    }

    public String getDataType() {
        return dataType;
    }

    public void setDataType(String dataType) {
        this.dataType = dataType;
    }

    public XSSFColor getFillForegroundColor() {
        return fillForegroundColor;
    }

    public void setFillForegroundColor(XSSFColor fillForegroundColor) {
        this.fillForegroundColor = fillForegroundColor;
    }

    public FillPatternType getFillPattern() {
        return fillPattern;
    }

    public void setFillPattern(FillPatternType fillPattern) {
        this.fillPattern = fillPattern;
    }

    public short getFontSize() {
        return fontSize;
    }

    public void setFontSize(short fontSize) {
        this.fontSize = fontSize;
    }

    public short getCellHeight() {
        return cellHeight;
    }

    public void setCellHeight(short cellHeight) {
        this.cellHeight = cellHeight;
    }

    public HorizontalAlignment getAlignment() {
        return alignment;
    }

    public void setAlignment(HorizontalAlignment alignment) {
        this.alignment = alignment;
    }

    public boolean isBorder() {
        return border;
    }

    public void setBorder(boolean border) {
        this.border = border;
    }

    public String getFontName() {
        return fontName;
    }

    public void setFontName(String fontName) {
        this.fontName = fontName;
    }
}
